Monochromatic light passing through two parallel narrow slits to a screen forms a pattern of alternate light and dark stripes. The light stripes are brightest at those points on the screen where the distances to the two slits differs by a whole number of wavelengths, so the waves from the slits arrive at those points in sync: the waves add constructively. At points where the difference is half a wavelength, the waves are exactly out of phase, the waves have the same amplitude but opposite sign, and add destructively, leaving darkness.
In this applet, the pattern is built up by moving across the screen checking the relative phase of the waves from the two slits at each point on the screen.
Suggestion: press Play to find the default pattern. Now, without pressing the rewind button, adjust the wavelength and the slit separation, and press Play again. It will put one pattern on top of another, so you can compare: how does the pattern change with color? with slit separation? Can you explain the differences?
Code by Nicholas Anderson and Lawrence Hook.